extends Area2D

onready var ani = $AnimationPlayer


func _ready():
	visible = false


# 角色进入后淡出目标十字
func _on_target_body_entered(body:PhysicsBody2D):
	ani.play("fade_out")
	pass

func _physics_process(delta):
	if Input.is_action_pressed("click"):
		global_position = get_global_mouse_position()

# 鼠标点击时，目标十字淡入
func _unhandled_input(event):
	if event.is_action_released("click"):
		ani.play("fade_in")
